import { Document, Schema } from 'mongoose'

export interface ChatMessage extends Document {
  userId: string
  roomId: string
  content: string
  timestamp: Date
}

export const ChatMessageSchema = new Schema({
  userId: { type: String, required: true },
  roomId: { type: String, required: true },
  content: { type: String, required: true },
  timestamp: { type: Date, default: Date.now },
})
